def-rhythm defines an instrument's rhythms and symbol structure. Def-description begins with the instrument name, followed by the resolution, rhythm-string and the fill-pattern.
This example defines a bass, snare and hihat; all 2 bars long (note that the snare resolution is 1/8). Bass is filled with a, which represents the bass drum. Snare is filled with b and hihat is filled with g. The rhythm-string length is not restricted. In normal use, 2 or 4 bars of 1/16 notes is only needed to express many patterns in pop music.
The resolution 1/16 means that each column represents a 1/16 note. In the rhythm-string, " " (space) describes a rest and "-" describes a note. The note value is taken from the fill-pattern sequentially. The user can add comment lines to clarify the overall description lengths, for example, bars. This function is normally used with compile-song, as most rhythms and symbol definitions can be made easily with it. The symbols can also be written in the rhythm-string as they are. Function calls can be used inside the eval form. This evaluates the list and returns a symbol list, the values of which are then bound to the rhythm string. The resolution value can be replaced by a variable containing a list of length values.